#include <reg52.h>
#include <intrins.h>
#define unchar unsigned char
#define unint unsigned int

sbit du=P2^6;
sbit we=P2^7;
sbit s2=P3^0;
sbit s3=P3^1;
sbit led1=P1^0;
sbit led2=P1^1;
sbit sign=P3^7;

void Delay(int z)
{
	unsigned int x,y;
	for(x=z;x>0;x--)
	for(y=114;y>0;y--);
}

void int1_init()
{
	EA=1;
	EX1=1;
	IT1=1;
}

void main()
{
	int1_init();
	while(1)
	{
		led1=1;
		Delay(1000);
		led1=~led1;
		Delay(1000);
		if(s2==0)
		{
			sign=1;
			sign=0;
		}
	}
}
void dealing() interrupt 2
{
	led2=0;
	Delay(3000);
	led2=~led2;
}